import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class Login extends JPanel implements ActionListener {

    private JButton loginBtn;
    private Start frame;
    private Icon anj=Util.getIcon("/images/buttonLand.jpg");

    public Login(Start frame) {
        this.frame = frame;
        this.setLayout(null);

        this.setOpaque(false);
        JLabel titleLabel = new JLabel();
        titleLabel.setBounds(0,0,0,0);
        this.add(titleLabel);

        loginBtn = new JButton(anj);
        loginBtn.setBounds(350,250,100,50);
        this.add(loginBtn);
        loginBtn.addActionListener(this);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        if(e.getSource() == loginBtn){
            frame.switchPanel("menu");
        }
    }
}
